<?php
/* @var $this UserAdminController */
/* @var $model User */

$this->breadcrumbs=array(
	'Users'=>array('index'),
	$model->user_id,
);

$this->menu=array(
	array('label'=>'Tạo mới', 'url'=>array('create')),
	array('label'=>'Sửa', 'url'=>array('update', 'id'=>$model->user_id)),
	//array('label'=>'Xoá', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->user_id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Quản lý User', 'url'=>array('admin')),
);
?>

<h1>Chi tiết người dùng (Mã: <?php echo $model->user_id; ?>)</h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'user_id',
		'email',
		'password',
		'firstname',
		'lastname',
        array(
            'name'=>'gender',
            'value'=>($model->gender)?'Nam':'Nữ',
        ),
        array(
            'name'=>'birthday',
            'value'=>date("d-m-Y",$model->birthday),
        ),
		'passport',
		'address',
        array(
            'name'=>'city',
            'type'=>'raw',
            'value'=>City::model()->getName($model->city),
        ),
		'mobile',
        array(
            'name'=>'status',
            'type'=>'raw',
            'value'=>($model->status)?"<input data-no-uniform=\"true\" checked type=\"checkbox\" class=\"iphone-toggle\" disabled=\"disabled\">":"<input data-no-uniform=\"true\" type=\"checkbox\" class=\"iphone-toggle\" disabled=\"disabled\">",
        ),
        array(
            'name'=>'permission',
            'type'=>'raw',
            'value'=>Permission::model()->getAllPermissionName($model->permission),
        ),
        'signup',
        'lastlogin',
	),
)); ?>
